home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / CPlusPlus / PfTypLs.xh < prev    next >
Encoding:
Text File  |  1994-04-19  |  5.3 KB  |  218 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:CPlusPlus:PfTypLs.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emitxh.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODPlatformTypeSet_xh
  18. #define SOM_ODPlatformTypeSet_xh
  19.  
  20. class ODPlatformTypeSet;
  21.  
  22. #define ODPlatformTypeSet_MajorVersion 0
  23. #define ODPlatformTypeSet_MinorVersion 0
  24.  
  25. /* C++ som defs */
  26. #include <somcls.xh>
  27.  
  28. /* Include C++ parent defs */
  29. #ifndef SOM_ODObject_xh
  30. #include <ODObject.xh>
  31. #endif
  32.  
  33. #ifndef ODPlatformTypeSet_API
  34. #define ODPlatformTypeSet_API
  35. /*
  36.  * -- The Class API
  37.  */
  38.  
  39. /*
  40.  * Start of user-defined types:
  41.  */
  42. class ODExtension;
  43. class ODPlatformTypeSetIterator;
  44.  
  45. /*
  46.  * End of user-defined types.
  47.  */
  48.  
  49. #if applec ^ PRAGMA_LIB_EXPORT
  50. #pragma lib_export on
  51. #endif
  52.  
  53.  
  54. /* A procedure to create the ODPlatformTypeSet Class */
  55. SOMEXTERN SOMClass * SOMLINK ODPlatformTypeSetNewClass(
  56.         integer4 majorVersion,
  57.         integer4 minorVersion);
  58.  
  59. /* The API to the ODPlatformTypeSet class object, and the methods it introduces. */
  60. typedef struct ODPlatformTypeSetClassDataStructure {
  61.     SOMClass *classObject;
  62.     somMToken InitPlatformTypeSet;
  63.     somMToken Add;
  64.     somMToken Union;
  65.     somMToken Remove;
  66.     somMToken Difference;
  67.     somMToken Contains;
  68.     somMToken Count;
  69.     somMToken CreatePlatformTypeSetIterator;
  70. } ODPlatformTypeSetClassDataStructure;
  71. #ifdef SOM_NO_DATA_EXPORTS
  72.    SOMEXTERN ODPlatformTypeSetClassDataStructure * ODPlatformTypeSetGetClassData ( void );
  73. #   undef ODPlatformTypeSetClassData
  74. #   define ODPlatformTypeSetClassData (*ODPlatformTypeSetGetClassData())
  75. #else
  76.    SOMEXTERN ODPlatformTypeSetClassDataStructure ODPlatformTypeSetClassData;
  77. #endif /* SOM_NO_DATA_EXPORTS */
  78.  
  79. #if applec ^ PRAGMA_LIB_EXPORT
  80. #pragma lib_export off
  81. #endif
  82.  
  83. #define _ODPlatformTypeSet ODPlatformTypeSetClassData.classObject
  84.  
  85. /* The API to parentMtabs for ODPlatformTypeSet, and the instance data it introduces. */
  86. SOMEXTERN struct ODPlatformTypeSetCClassDataStructure {
  87.     somMethodTabs parentMtab;
  88.     somDToken instanceDataToken;
  89. } ODPlatformTypeSetCClassData;
  90.  
  91. /*
  92.  * -- Typedefs for Procedures that support Methods introduced by ODPlatformTypeSet
  93.  */
  94. SOMEXTERN {
  95. typedef void   (* SOMLINK somTD_ODPlatformTypeSet_InitPlatformTypeSet)(ODPlatformTypeSet *somSelf, Environment *ev);
  96. typedef void   (* SOMLINK somTD_ODPlatformTypeSet_Add)(ODPlatformTypeSet *somSelf, Environment *ev,
  97.         ODPlatformType type);
  98. typedef void   (* SOMLINK somTD_ODPlatformTypeSet_Union)(ODPlatformTypeSet *somSelf, Environment *ev,
  99.         ODPlatformTypeSet* typeSet);
  100. typedef void   (* SOMLINK somTD_ODPlatformTypeSet_Remove)(ODPlatformTypeSet *somSelf, Environment *ev,
  101.         ODPlatformType type);
  102. typedef void   (* SOMLINK somTD_ODPlatformTypeSet_Difference)(ODPlatformTypeSet *somSelf, Environment *ev,
  103.         ODPlatformTypeSet* typeSet);
  104. typedef ODBoolean   (* SOMLINK somTD_ODPlatformTypeSet_Contains)(ODPlatformTypeSet *somSelf, Environment *ev,
  105.         ODPlatformType type);
  106. typedef ODULong   (* SOMLINK somTD_ODPlatformTypeSet_Count)(ODPlatformTypeSet *somSelf, Environment *ev);
  107. typedef ODPlatformTypeSetIterator*   (* SOMLINK somTD_ODPlatformTypeSet_CreatePlatformTypeSetIterator)(ODPlatformTypeSet *somSelf, Environment *ev);
  108. }
  109.  
  110. #endif /* ODPlatformTypeSet_API */
  111.  
  112.  
  113. /*
  114.  * -- Method Tokens are Thunks
  115.  */
  116. #undef somresolve_
  117. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  118.  
  119. /*
  120.  * -- The C++ Wrapper Class for ODPlatformTypeSet
  121.  */
  122. class ODPlatformTypeSet : public ODObject
  123. {
  124. public:
  125.  
  126. void *operator new(size_t size)
  127. {
  128.    SOM_IgnoreWarning(size);
  129.    if (!ODPlatformTypeSetClassData.classObject) 
  130.       ODPlatformTypeSetNewClass(ODPlatformTypeSet_MajorVersion,ODPlatformTypeSet_MinorVersion);
  131.    return (void *)
  132.       ((somTD_SOMClass_somNew)
  133.       somresolve_((SOMObject *)((void*)(ODPlatformTypeSetClassData.classObject)),
  134.                  SOMClassClassData.somNew))
  135.          ((SOMClass *)((void*)(ODPlatformTypeSetClassData.classObject)));
  136. }
  137.  
  138. void operator delete(void * obj)
  139. {
  140.    ((SOMObject *)obj)->somFree();
  141. }
  142.  
  143. /* public method: InitPlatformTypeSet */
  144. void   InitPlatformTypeSet(Environment *ev)
  145. {
  146.    SOM_Resolve(this,ODPlatformTypeSet,InitPlatformTypeSet)
  147.     (this,ev);
  148. }
  149.  
  150.  
  151. /* public method: Add */
  152. void   Add(Environment *ev,
  153.         ODPlatformType type)
  154. {
  155.    SOM_Resolve(this,ODPlatformTypeSet,Add)
  156.     (this,ev,type);
  157. }
  158.  
  159.  
  160. /* public method: Union */
  161. void   Union(Environment *ev,
  162.         ODPlatformTypeSet* typeSet)
  163. {
  164.    SOM_Resolve(this,ODPlatformTypeSet,Union)
  165.     (this,ev,typeSet);
  166. }
  167.  
  168.  
  169. /* public method: Remove */
  170. void   Remove(Environment *ev,
  171.         ODPlatformType type)
  172. {
  173.    SOM_Resolve(this,ODPlatformTypeSet,Remove)
  174.     (this,ev,type);
  175. }
  176.  
  177.  
  178. /* public method: Difference */
  179. void   Difference(Environment *ev,
  180.         ODPlatformTypeSet* typeSet)
  181. {
  182.    SOM_Resolve(this,ODPlatformTypeSet,Difference)
  183.     (this,ev,typeSet);
  184. }
  185.  
  186.  
  187. /* public method: Contains */
  188. ODBoolean   Contains(Environment *ev,
  189.         ODPlatformType type)
  190. {
  191.    return SOM_Resolve(this,ODPlatformTypeSet,Contains)
  192.     (this,ev,type);
  193. }
  194.  
  195.  
  196. /* public method: Count */
  197. ODULong   Count(Environment *ev)
  198. {
  199.    return SOM_Resolve(this,ODPlatformTypeSet,Count)
  200.     (this,ev);
  201. }
  202.  
  203.  
  204. /* public method: CreatePlatformTypeSetIterator */
  205. ODPlatformTypeSetIterator*   CreatePlatformTypeSetIterator(Environment *ev)
  206. {
  207.    return SOM_Resolve(this,ODPlatformTypeSet,CreatePlatformTypeSetIterator)
  208.     (this,ev);
  209. }
  210.  
  211.  
  212.  
  213. };   /* ODPlatformTypeSet */
  214.  
  215.  
  216.  
  217. #endif       /* SOM_ODPlatformTypeSet_xh */
  218.